<?php namespace Common\Model;
use Hdphp\Model\Model;
class Type extends Model{
	protected $table="type";
//	
	protected $validate=array(
		array('types','required','类型名称不能为空',3,3),
		array('types','maxlen:20','类型不能超过二十个字',3,3),
	);
	
	public function store(){
		if($this->create()){
			return $this->add();
		}else{
			return false;
		}
	}

	public function edit(){
		if($this->create()){
			
			$this->save();
		
			return true;
		}else{
			return false;
		}
	}
	
	
	
	
	
	
	
	
	
}
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
?>